<div class="widget-box dataTables_wrapper">
<?php $form = $this->beginWidget('GxActiveForm', array(
	'id' => 'static-page-form',
	//'enableAjaxValidation' => true,
  'htmlOptions'=>array('enctype'=>'multipart/form-data', 'class'=>'form-horizontal'),
));
?>
	<fieldset>

	<p class="note">
		<?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
	</p>
	<div class="control-group">
		<?php echo $form->labelEx($model,'title', array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model, 'title', array('maxlength' => 128)); ?>
		<?php echo $form->error($model,'title'); ?>
		</div>
	</div>
	
	<div class="control-group">
		<?php echo $form->labelEx($model,'image', array('class'=>'control-label')); ?>
		<div class="controls">
		<?php if (isset($model->image) && ($model->image != 'NULL')): ?>
			<?php if(file_exists(Yii::app()->createUrl('/').'wwwroot/upload_files/banners/' . $model->image)): ?>
				<img src="<?php echo  Yii::app()->createUrl('/').'/wwwroot/upload_files/banners/' . $model->image; ?>" width="100" height="70"/>
			<?php else : ?>
				<?php echo CHtml::image('/wwwroot/upload_files/banners/no-image.png', 'Image', array(
							'width'		=>	'100',
							'height'	=>	'70'
				)); ?>
			<?php endif ?>
			<div class="clr"></div>
		<?php endif ?>
		<?php echo $form->fileField($model,'image'); ?>
		<?php echo $form->error($model,'image'); ?>
		</div>
		</div><!-- wd-input -->
		<div class="control-group">
		<?php echo $form->labelEx($model,'description', array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textArea($model, 'description'); ?>
		<?php echo $form->error($model,'description'); ?>
		</div>
		</div>
		<div class="control-group">
		<?php echo $form->labelEx($model,'priority', array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model, 'priority'); ?>
		<?php echo $form->error($model,'priority'); ?>
		</div>
		</div>
		<div class="form-actions">
		<?php echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class'=>'btn btn-primary')); ?>
		</div>
	</fieldset>
<?php
$this->endWidget();
?>
</div><!-- form -->